import com.cos.ssm2.common.ResultCode;
import com.cos.ssm2.dao.EmpDao;
import com.cos.ssm2.entity.vo.EmpVo;
import com.cos.ssm2.services.EmpServices;
import com.github.pagehelper.PageHelper;
//import org.apache.log4j.Logger;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.List;

/**
 * @author: COS
 * @time: 2022/6/10 10:26
 * @description:
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath*:application.xml")
public class Demo {

    //    Logger log = Logger.getLogger(Demo.class);
    Logger log = LoggerFactory.getLogger(Demo.class);
    @Autowired
    EmpDao empDao;

    @Test
    public void t2() {
        System.out.println();
        for (int i = 0; i < 100000; i++) {
            log.trace("trace");
            log.debug("debug");
            log.info("info");
            log.warn("warn");
            log.error("error");
        }
//        for (int i = 0; i < 10000; i++) {
//            log.trace("trace"+i);
//            log.debug("debug"+i);
//            log.info("info"+i);
//            log.warn("warn"+i);
//            log.error("error"+i);
//            log.fatal("fatal"+i);
//        }
    }
@Autowired
private EmpServices empServices;

    @Test
    public void t1() {
        empServices.getAll();
//        PageHelper.startPage(1, 5);
//        List<EmpVo> empWithDept = empDao.getEmpWithDept();
//        System.out.println(empWithDept);
//        System.out.println(ResultCode.SUCCESS);
//        System.out.println(ResultCode.SUCCESS.getCode());
//        System.out.println(ResultCode.SUCCESS.getMsg());
    }

}
